<!DOCTYPE html>
<html lang="en">
<head>

    <link rel="stylesheet" href="../../static/editor.md/css/editormd.min.css"/>

    {[{template "headerbodycontent" .}]}
    <meta name="keywords" content="{[{ .blog.Tags }]}">
    <meta name="description" content="{[{ .blog.Intro }]}">


</head>
<body>
<div id="app">

    {[{template "header" .}]}

    <div class="container grid-lg indexcontent">

        <div class="columns">
            <div class="column col-12">
                <div class="list">


                    <div class="title">
                        {[{ .blog.Title }]}
                    </div>

                    <div class="info">
                        <div class="article_info"><span class="autor_name"> {[{ .blog.Author }]}</span> <span
                                    class="time">发布于 {[{ .blog.Publishtime }]}</span>
                        </div>
                        <div class="icon-icon-list"><i class="fa fa-eye" aria-hidden="true"></i>&nbsp;{[{ .blog.Views}]}
                            &nbsp;&nbsp;
                            <i class="fa fa-comments" aria-hidden="true"></i>&nbsp;{[{ .blog.Comments }]}
                        </div>
                    </div>

                    <div id="content">
                        <!-- Server-side output Markdown text -->
                        <textarea style="display:none;">{[{ .blog.Content }]}</textarea>
                    </div>


                </div>

                <div>
                    <!--评论-->
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="blog-{[{ .blog.Blogid }]}"></div>
                    <script type="text/javascript">
                        (function () {
                            var appidfull = '{[{ .blogset.Commentcode }]}' + "|";
                            var appid = appidfull.split("|")[0];
                            var conf = appidfull.split("|")[1];
                            var width = window.innerWidth || document.documentElement.clientWidth;
                            if (width < 960) {
                                window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="http://cy-cdn.kuaizhan.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>');
                            } else {
                                var loadJs = function (d, a) {
                                    var c = document.getElementsByTagName("head")[0] || document.head || document.documentElement;
                                    var b = document.createElement("script");
                                    b.setAttribute("type", "text/javascript");
                                    b.setAttribute("charset", "UTF-8");
                                    b.setAttribute("src", d);
                                    if (typeof a === "function") {
                                        if (window.attachEvent) {
                                            b.onreadystatechange = function () {
                                                var e = b.readyState;
                                                if (e === "loaded" || e === "complete") {
                                                    b.onreadystatechange = null;
                                                    a()
                                                }
                                            }
                                        } else {
                                            b.onload = a
                                        }
                                    }
                                    c.appendChild(b)
                                };
                                loadJs("http://cy-cdn.kuaizhan.com/upload/changyan.js", function () {
                                    window.changyan.api.config({appid: appid, conf: conf})
                                });
                            }
                        })(); </script>

                </div>
            </div>

        </div>
    </div>


</div>


{[{template "footer" .}]}

<script src="../../static/jquery.min.js"></script>
<script src="../../static/editor.md/editormd.min.js"></script>
<script src="../../static/editor.md/lib/marked.min.js"></script>
<script src="../../static/editor.md/lib/prettify.min.js"></script>
<script type="text/javascript">
    $(function () {
        var testView = editormd.markdownToHTML("content", {
            // markdown : "[TOC]\n### Hello world!\n## Heading 2", // Also, you can dynamic set Markdown text
            // htmlDecode : true,  // Enable / disable HTML tag encode.
            // htmlDecode : "style,script,iframe",  // Note: If enabled, you should filter some dangerous HTML tags for website security.
        });
    });


    UploadViews = function () {

        var blogid = {[{.blog.Blogid}]};
        $.post("../api/v1/blogs/updateview?blogid=" + blogid, {suggest: 'test'}, function (result) {

        });

    }

    $(document).ready(function () {
        UploadViews();
    });
</script>


</body>
</html>